<template>
  <div class="mask-content" v-if="props.modelValue">
    <slot ></slot>
  </div>
  <div class="mask" v-if="props.modelValue" @click="bindTap(false)"></div>
</template>

<script lang="ts" setup>
const props = defineProps({
  modelValue: {
    type: Boolean,
    default: () => false
  }
})
const emit = defineEmits(['update:modelValue'])

const bindTap = (tf: Boolean) => {
  emit('update:modelValue', tf)
}



</script>

<style scoped lang="scss">
.mask-content {
  position: fixed;
  display: flex;
  align-items: center;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 101;
}
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 52, 51, 0.25);
  z-index: 100;
}
</style>
